//
// Created by macro on 2020/1/8.
//

#include <iostream>
#include "helper.h"

void selectSort(int arr[], int n){
    for (int i = 0; i < n; ++i) {
        int minval = i;
        for (int j = i; j < n-1; ++j) {
            if (arr[j] > arr[minval])
            swap(arr[j], arr[minval]);
        }
    }
}

int main() {
    int n = 10000;
    int *arr = SortTestHelper::generateRandomArray(n,0,n);
    SortTestHelper::testSort("bubble sort",selectSort,arr,n);
    delete[] arr;
}
